package com.sg.controller.bff;

import com.sg.service.biz.bff.TimingTaskService;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "TimingTask", tags = {"TimingTask"})
@RestController
// @RequestMapping("/oms/timingTask/")
public class TimingTaskController {
    @Autowired
    TimingTaskService timingTaskService;

    /**
     * B3-循环设定祖先目标父子状态（人工真实测试）
     * gen by moon at 9/22/2022, 1:09:20 AM
     */
    @PostMapping("/oms/timingTask/loopSetTargetAncestorParentState")
    @ApiOperation(value = "B3-循环设定祖先目标父子状态（人工真实测试）", response = OkrResult.class)
    public OkrResult<BffLoopSetTargetAncestorParentStateRespDto> loopSetTargetAncestorParentState(@RequestBody(required = false) @Validated BffLoopSetTargetAncestorParentStateReqDto reqDTO) {
        return OkrResult.success(timingTaskService.loopSetTargetAncestorParentState(reqDTO));
    }

    /**
     * B3-简易生成汇报任务（人工真实测试）
     * gen by moon at 10/2/2022, 9:25:09 AM
     */
    @PostMapping("/oms/timingTask/addSimpleAddReportTask")
    @ApiOperation(value = "B3-简易生成汇报任务（人工真实测试）", response = OkrResult.class)
    public OkrResult<BffAddSimpleAddReportTaskRespDto> addSimpleAddReportTask(@RequestBody(required = false) @Validated BffAddSimpleAddReportTaskReqDto reqDTO) {
        return OkrResult.success(timingTaskService.addSimpleAddReportTask(reqDTO));
    }

    /**
     * B3-删除指标基本信息（人工真实测试）
     * gen by moon at 9/22/2022, 1:09:08 AM
     */
    @PostMapping("/oms/timingTask/deleteTargetObjBasicInfo")
    @ApiOperation(value = "B3-删除指标基本信息（人工真实测试）", response = OkrResult.class)
    public OkrResult<BffDeleteTargetObjBasicInfoRespDto> deleteTargetObjBasicInfo(@RequestBody(required = false) @Validated BffDeleteTargetObjBasicInfoReqDto reqDTO) {
        return OkrResult.success(timingTaskService.deleteTargetObjBasicInfo(reqDTO));
    }

    /**
     * B3-删除目标分类基本信息（人工真实测试）
     * gen by moon at 9/22/2022, 1:09:12 AM
     */
    @PostMapping("/oms/timingTask/deleteTargetCatBasicInfo")
    @ApiOperation(value = "B3-删除目标分类基本信息（人工真实测试）", response = OkrResult.class)
    public OkrResult<BffDeleteTargetCatBasicInfoRespDto> deleteTargetCatBasicInfo(@RequestBody(required = false) @Validated BffDeleteTargetCatBasicInfoReqDto reqDTO) {
        return OkrResult.success(timingTaskService.deleteTargetCatBasicInfo(reqDTO));
    }

    /**
     * B3-更新四棵树偏差天数等数据（人工真实测试）
     * gen by moon at 9/22/2022, 1:09:13 AM
     */
    @PostMapping("/oms/timingTask/refreshFourTreeDeviationDaysEtc")
    @ApiOperation(value = "B3-更新四棵树偏差天数等数据（人工真实测试）", response = OkrResult.class)
    public OkrResult<BffRefreshFourTreeDeviationDaysEtcRespDto> refreshFourTreeDeviationDaysEtc(@RequestBody(required = false) @Validated BffRefreshFourTreeDeviationDaysEtcReqDto reqDTO) {
        return OkrResult.success(timingTaskService.refreshFourTreeDeviationDaysEtc(reqDTO));
    }

    /**
     * B3-更新子周期阶段当前周期等（人工真实测试）
     * gen by moon at 10/5/2022, 1:14:22 PM
     */
    @PostMapping("/oms/timingTask/refreshStageCurrentCycleEtc")
    @ApiOperation(value = "B3-更新子周期阶段当前周期等（人工真实测试）", response = OkrResult.class)
    public OkrResult<BffRefreshStageCurrentCycleEtcRespDto> refreshStageCurrentCycleEtc(@RequestBody(required = false) @Validated BffRefreshStageCurrentCycleEtcReqDto reqDTO) {
        return OkrResult.success(timingTaskService.refreshStageCurrentCycleEtc(reqDTO));
    }

    /**
     * B3-更新末级周期阶段当前周期等（人工真实测试）
     * gen by moon at 10/4/2022, 6:12:32 PM
     */
    @PostMapping("/oms/timingTask/refreshStageEndCurrentCycleEtc")
    @ApiOperation(value = "B3-更新末级周期阶段当前周期等（人工真实测试）", response = OkrResult.class)
    public OkrResult<BffRefreshStageEndCurrentCycleEtcRespDto> refreshStageEndCurrentCycleEtc(@RequestBody(required = false) @Validated BffRefreshStageEndCurrentCycleEtcReqDto reqDTO) {
        return OkrResult.success(timingTaskService.refreshStageEndCurrentCycleEtc(reqDTO));
    }

    /**
     * B3-更新任务逾期等数据（人工真实测试）
     * gen by moon at 9/22/2022, 1:09:19 AM
     */
    @PostMapping("/oms/timingTask/refreshTaskOverdueEtc")
    @ApiOperation(value = "B3-更新任务逾期等数据（人工真实测试）", response = OkrResult.class)
    public OkrResult<BffRefreshTaskOverdueEtcRespDto> refreshTaskOverdueEtc(@RequestBody(required = false) @Validated BffRefreshTaskOverdueEtcReqDto reqDTO) {
        return OkrResult.success(timingTaskService.refreshTaskOverdueEtc(reqDTO));
    }

    /**
     * B3-2提交人工补偿异步调度任务(管理)
     * gen by moon at 12/22/2022, 12:26:42 AM
     */
    @PostMapping("/oms/mgt/timingTask/commitHandRescueSlowTask")
    @ApiOperation(value = "B3-2提交人工补偿异步调度任务(管理)", response = OkrResult.class)
    public OkrResult<BffCommitHandRescueSlowTaskRespDto> commitHandRescueSlowTask(@RequestBody(required = false) @Validated BffCommitHandRescueSlowTaskReqDto reqDTO) {
        return OkrResult.success(timingTaskService.commitHandRescueSlowTask(reqDTO));
    }

    /**
     * B3-更新四棵树偏差天数等调度（人工真实测试）
     * gen by moon at 9/28/2022, 7:15:27 AM
     */
    @PostMapping("/oms/timingTask/refreshFourTreeDeviationDaysDispatch")
    @ApiOperation(value = "B3-更新四棵树偏差天数等调度（人工真实测试）", response = OkrResult.class)
    public OkrResult<BffRefreshFourTreeDeviationDaysDispatchRespDto> refreshFourTreeDeviationDaysDispatch(@RequestBody(required = false) @Validated BffRefreshFourTreeDeviationDaysDispatchReqDto reqDTO) {
        return OkrResult.success(timingTaskService.refreshFourTreeDeviationDaysDispatch(reqDTO));
    }

    /**
     * B3执行启用空间长生调度MQ(管理)
     * gen by moon at 5/14/2023, 3:05:02 AM
     */
    @PostMapping("/oms/mgt/timingTask/implementEnableSpaceEverYoungDispatchMq")
    @ApiOperation(value = "B3执行启用空间长生调度MQ(管理)", response = OkrResult.class)
    public OkrResult<BffImplementEnableSpaceEverYoungDispatchMqRespDto> implementEnableSpaceEverYoungDispatchMq(@RequestBody(required = false) @Validated BffImplementEnableSpaceEverYoungDispatchMqReqDto reqDTO) {
        return OkrResult.success(timingTaskService.implementEnableSpaceEverYoungDispatchMq(reqDTO));
    }

    /**
     * B3执行分析目标内容情况(管理)
     * gen by moon at 5/18/2023, 11:06:50 PM
     */
    @PostMapping("/oms/mgt/timingTask/implementAnalyseDogBoneResidue")
    @ApiOperation(value = "B3执行分析目标内容情况(管理)", response = OkrResult.class)
    public OkrResult<BffImplementAnalyseDogBoneResidueRespDto> implementAnalyseDogBoneResidue(@RequestBody(required = false) @Validated BffImplementAnalyseDogBoneResidueReqDto reqDTO) {
        return OkrResult.success(timingTaskService.implementAnalyseDogBoneResidue(reqDTO));
    }

}

